<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://www.ecside.org" prefix="ec"%>
<jsp:useBean id="pageBean" scope="request" class="com.agileai.hotweb.domain.PageBean"/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>用户管理</title>
<%@include file="/jsp/inc/resource.inc.jsp"%>
<script language="javascript">
var resetPasswordBox;
function openResetPasswordBox(){
	if (!isSelectedRow()){
		writeErrorMsg('请先选中一条记录!');
		return;
	}
	var title = '重置用户密码';
	if (!resetPasswordBox){
		resetPasswordBox = new PopupBox('resetPasswordBox',title,{size:'normal',height:'300px',top:'2px'});
	}
	var url = 'index?ResetPassword&USER_ID='+$("#USER_ID").val();
	resetPasswordBox.sendRequest(url);
}

var addUserAuthTreeBox;
function showUserAuthTreeBox(){
	if (!isSelectedRow()){
		writeErrorMsg('请先选中一条记录!');
		return;
	}
	if (!addUserAuthTreeBox){
		addUserAuthTreeBox = new PopupBox('addUserAuthTreeBox','请选择关联菜单',{size:'normal',height:'410px',width:'310px',top:'3px'});
	}
	var url = 'index?SysFuncBaseTreeSelect&AUTH_USER_ID='+$("#USER_ID").val();
	addUserAuthTreeBox.sendRequest(url);
}
</script>
</head>
<body>
<form action="<%=pageBean.getHandlerURL()%>" name="form1" id="form1" method="post">
<%@include file="/jsp/inc/message.inc.jsp"%>
<div id="__ParamBar__" style="float: right;">
用户名称<input id="userName" label="用户名称" name="userName" type="text" value="<%=pageBean.inputValue("userName")%>" size="10" class="text" />
用户类型<select id="userType" label="用户类型" name="userType" class="select" onchange="doQuery()"><%=pageBean.selectValue("userType")%></select>
&nbsp;<input type="button" name="button" id="button" value="查询" class="formbutton" onclick="doQuery()" />
</div>
<div id="__ToolBar__">
<table border="0" cellpadding="0" cellspacing="1">
<tr>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="A" align="center" onclick="doRequest('insertRequest')"><input value="&nbsp;" title="新增" type="button" class="createImgBtn" />新增</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="E" align="center" onclick="doRequest('updateRequest')"><input value="&nbsp;" title="编辑" type="button" class="editImgBtn" />编辑</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="C" align="center" onclick="doRequest('copyRequest')"><input value="&nbsp;" title="复制" type="button" class="copyImgBtn" />复制</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="V" align="center" onclick="doRequest('viewDetail')"><input value="&nbsp;" title="查看" type="button" class="detailImgBtn" />查看</td>   
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="D" align="center" onclick="doDelete($('#'+rsIdTagId).val());"><input value="&nbsp;" title="删除" type="button" class="delImgBtn" />删除</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="W" align="center" onclick="openResetPasswordBox()"><input value="&nbsp;" title="重置密码" type="button" class="resetPasswordImgBtn" />重置</td>   
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="B" align="center" onclick="goToMain();"><input value="&nbsp;" title="返回" type="button" class="backImgBtn" />返回</td>
   <td onmouseover="onMover(this);" onmouseout="onMout(this);" class="bartdx" hotKey="O" align="center" onclick="showUserAuthTreeBox();"><input value="&nbsp;" title="设置权限" type="button" class="staImgBtn" />设置权限</td>   
</tr>
</table>
</div>
<ec:table 
form="form1"
var="row"
items="pageBean.rsList" csvFileName="用户管理.csv"
retrieveRowsCallback="process" xlsFileName="用户管理.xls"
useAjax="true" sortable="true"
doPreload="false" toolbarContent="navigation|pagejump |pagesize |export|extend|status"
width="100%" rowsDisplayed="10"
listWidth="100%" 
height="390px"
>
<ec:row styleClass="odd" ondblclick="doRequest('viewDetail')" oncontextmenu="selectRow(this,{USER_ID:'${row.USER_ID}'});refreshConextmenu()" onclick="selectRow(this,{USER_ID:'${row.USER_ID}'})">
	<ec:column width="50" style="text-align:center" property="_0" title="序号" value="${GLOBALROWCOUNT}" />
	<ec:column width="100" property="USER_CODE" title="用户名"   />
	<ec:column width="100" property="USER_NAME" title="名称"   />
	<ec:column width="100" property="USER_TYPE" title="类型"   mappingItem="USER_TYPE"/>
	<ec:column width="100" property="USER_STATE" title="状态"   mappingItem="USER_STATE"/>
</ec:row>
</ec:table>
<input type="hidden" name="USER_ID" id="USER_ID" value="" />
<input type="hidden" name="actionType" id="actionType" />
<script language="JavaScript">
setRsIdTag('USER_ID');
var ectableMenu = new EctableMenu('contextMenu','ec_table');
</script>
</form>
</body>
</html>
<%@include file="/jsp/inc/scripts.inc.jsp"%>
